package com.wwj.mapper;

import com.github.pagehelper.Page;
import com.wwj.annotation.AutoFill;
import com.wwj.annotation.enumeration.OperationType;
import com.wwj.pojo.dto.ReportPageQueryDTO;
import com.wwj.pojo.entity.Report;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface ReportMapper {

    //生成报告

    @AutoFill(value = OperationType.INSERT)
    void insertReport(Report report);


    //体检报告分页查询-管理端
    Page<Report> pageQuery(ReportPageQueryDTO reportPageQueryDTO);

    //体检报告分页查询-用户端
    Page<Report> pageQueryUser(ReportPageQueryDTO reportPageQueryDTO);
    //修改体检报告
    @AutoFill(OperationType.UPDATE)
    void updateDescription(Report report);

    //删除体检报告
    @Delete("delete from report where id=#{id}")
    void deleteById(Long id);


}
